<!--
  -    Copyright (c) 2018-2025, infomng All rights reserved.
  -
  - Redistribution and use in source and binary forms, with or without
  - modification, are permitted provided that the following conditions are met:
  -
  - Redistributions of source code must retain the above copyright notice,
  - this list of conditions and the following disclaimer.
  - Redistributions in binary form must reproduce the above copyright
  - notice, this list of conditions and the following disclaimer in the
  - documentation and/or other materials provided with the distribution.
  - Neither the name of the pig4cloud.com developer nor the names of its
  - contributors may be used to endorse or promote products derived from
  - this software without specific prior written permission.
  - Author: infomng
  -->
<template>
  <div class="execution">
    <basic-container>
      <avue-crud
        ref="crud"
        :data="tableData"
        :table-loading="tableLoading"
        :option="tableOption"
        @on-load=""
        @search-change="searchChange"
        @refresh-change="refreshChange"
      >
      </avue-crud>
    </basic-container>
  </div>
</template>

<script>
import { processInfo} from '@/api/workorder/workorderproductionreport'

export default {
  name: 'processInfo',
  props:{
    lineMainId:{//产线ID
      type:String
    },
    processId:{//工序ID
      type:String
    },
/*    workstation:{//工位
      type:String
    },*/
    itemCode:{
      type:String
    }
  },
  data() {
    return {
      tableData: [],
      tableLoading: false,
      tableOption : {
        border: true,
        index: true,
        indexLabel: "序号",
        stripe: true,
        menuAlign: "center",
        align: "center",
        menu: false,
        addBtn: false,
        refreshBtn:false,
        columnBtn:false,
        height: '45vh',
        column: [
        /*  {
            type: "input",
            label: "工位",
            prop: "workstation",
            span: 12,
            overHidden:true,
          },*/
          {
            type: "input",
            label: "工序",
            prop: "processName",
            span: 12,
            overHidden:true,
            width:150,
          },
          {
            type: "input",
            label: "工段",
            prop: "workshopSection",
            span: 12,
            overHidden:true,
            width:150,
          },
          {
            type: "input",
            label: "设备编码",
            prop: "device",
            span: 12,
            overHidden:true,
            width:150,
          },
          {
            type: "input",
            label: "设备名称",
            prop: "deviceNames",
            span: 12,
            overHidden:true,
          },
 /*         {
            type: "input",
            label: "夹具编码",
            prop: "clampSn",
            span: 12,
          },*/
          {
            type: "input",
            label: "夹具",
            prop: "ClampNames",
            span: 12,
            overHidden:true,
          },
      /*    {
            type: "input",
            label: "工具编码",
            prop: "toolSn",
            span: 12,
          },*/
         /* {
            type: "input",
            label: "工具名称",
            prop: "toolName",
            span: 12,
            overHidden:true,
          },*/
          {
            type: "input",
            label: "人员",
            prop: "personName",
            span: 12,
          }
        ]
      }
    }
  },
  computed: {
  },
  methods: {
    // 列表查询
    getList() {
      this.tableLoading = true
      var params = {};
      params.lineId = this.lineMainId;
      params.processId = this.processId;
      // params.workstation = this.workstation;
      // params.itemCode = this.itemCode;
      processInfo(params).then(response => {
        this.tableData = response.data.data
        this.tableLoading = false
      }).catch(() => {
        this.tableLoading = false
      })
    },

    // 查询事件
    searchChange(form, done) {
      this.getList()
      done()
    },
    // 刷新事件
    refreshChange() {
      this.getList()
    },
  }
}
</script>

<style scoped>
/deep/ .avue-crud__menu {
  min-height: 0px!important;
}
/deep/.el-card__body, .el-main{
  padding: 0px!important;
}
</style>

